#include <iostream>

using namespace std;

bool isLeapYear(int year)
{
    return (year%100==0)?(year%400==0?1:0):(year%4==0?1:0);
}

int main(void)
{
    int result = isLeapYear(1904);
    cout << result << endl;
    return 0;
}
